{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d152c227",
   "metadata": {},
   "source": [
    "# 1. 位置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0def5990",
   "metadata": {},
   "outputs": [],
   "source": [
    "# extensions = base（默认）\n",
    "# 1. 调用requests模块（Google chrome 浏览器）\n",
    "import requests\n",
    "\n",
    "# 2. 请求方法 ： GET\n",
    "\n",
    "# 3. URL地址 ：https://restapi.amap.com/v3/place/around?parameters \n",
    "\n",
    "regeo_url = 'https://restapi.amap.com/v3/place/around?parameters \n",
    "\n",
    "'\n",
    "\n",
    "# 4. 准备参数：用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"0c1a88822d74a37c7fe7800e5f36f775\",\n",
    "    \"address\":\"广东省广州市从化区广州南方学院\"\n",
    "}\n",
    "\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=regeo_url,params=payload)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "25b1e894",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "80bc5652",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '0', 'info': 'INVALID_PARAMS', 'infocode': '20000'}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "95d0fff9",
   "metadata": {},
   "source": [
    "# 搜索POI\n",
    "> 1. 关键词（keywords）\n",
    "> 2. 分类（types）规范（POI编码表）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e8d730af",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
